package org.lecric.wind44.client;

import org.lecric.wind44.client.model.Spots;
import org.lecric.wind44.client.widget.EditionPanel;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.RootPanel;

public class Suggest implements EntryPoint {

	@Override
	public void onModuleLoad()
	{
		SpotUtils.getSpots(new AsyncCallback<Spots>() {
			@Override
			public void onFailure(Throwable e) {
				GWT.log("Failed retrieving spots", e);
			}
			@Override
			public void onSuccess(Spots result) {
				EditionPanel editionPanel = new EditionPanel(result);
				RootPanel.get("main").add(editionPanel.createPanel());
			}
		});
	}

}
